import { createRouter, createWebHashHistory } from 'vue-router'
import Shop from '../views/Shop.vue'
import Home from '@/views/Home.vue'
import Message from '@/views/Message.vue'
import My from '@/views/My.vue'
import Classification from '@/views/Classification.vue'
import Xq from '@/views/Xq.vue'
import Cart from '@/views/Cart.vue'
const routes = [
  {
    path:'/',
    redirect: '/shop',  // 重定向:重新指向其它path,会改变网址
  },
  {
    path: '/shop',
    component: Shop
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/message',
    component: Message
  },
  {
    path: '/my',
    component: My
  },
  {
    path:'/classification',
    component:Classification
  },
  {
    path:'/xq',
    component:Xq
  },
  {
    path:'/cart',
    component:Cart
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
